﻿{% if CurrentItem %}


       	<b>{{ CurrentItem.Title }}</b>&nbsp;{{ CurrentItem.Date|date:" Y-m-j H:i:s" }}
	<blockquote>
		标签：{{ CurrentItem.Type }}<br><a href="{{ CurrentItem.SourceUrl }}">{{ CurrentItem.SourceUrl }}</a>
		{% ifequal 'my' Tag %}
			<br>我的评论：{{ CurrentItem.CommentOn }}
		{% else %}
			<br>喜爱人数：{{ CurrentItem.UserNumber }}
		{% endifequal %}
	</blockquote>

	{% for CommentOnItem in CommentOns %}
		{% if IsAdmin%}
			<form action="/like_commenton_delete?tag={{ Tag }}&page={{ CurPage }}&commentonpage={{ CurCommentOnPage }}&item={{ CurrentCollect.key }}" method="post">
		{% else %}
			{% ifequal 'my' Tag %}
				<form action="/like_commenton_delete?tag={{ Tag }}&page={{ CurPage }}&commentonpage={{ CurCommentOnPage }}&item={{ CurrentCollect.key }}" method="post">
			{% endifequal %}
		{% endif %}

		<HR />
		<a target="_blank" href="/usershow?item={{ CommentOnItem.LoginName }}">
		<img src = "/userphoto?item={{ CommentOnItem.LoginName }}" width="32px" height="32px" alt="{{ CommentOnItem.LoginName }}">
		</a>
		&nbsp;{{ CommentOnItem.Date|date:" Y-m-j H:i:s" }}
		<blockquote>{{ CommentOnItem.CommentOn }}</blockquote>

		{% if IsAdmin %}
			<div><input type="hidden" name="deletecommentonkey" value="{{ CommentOnItem.key }}"/></div>
			<div><input type="submit" value="删除"/></div>
			</form>
		{% else %}
			{% ifequal 'my' Tag %}
				<div><input type="hidden" name="deletecommentonkey" value="{{ CommentOnItem.key }}"/></div>
				<div><input type="submit" value="删除"/></div>
				</form>
			{% endifequal %}
		{% endif %}
	{% endfor %}

	<p align = "right">
	{% if PreCommentOnPage %}
		<a href = "/like?tag={{ Tag }}&page={{ CurPage }}&commentonpage={{ PreCommentOnPage }}&item={{ CurrentItem.key }}">上一页</a>
	{% endif %}

	{% if NextCommentOnPage %}
		<a href = "/like?tag={{ Tag }}&page={{ CurPage }}&commentonpage={{ NextCommentOnPage }}&item={{ CurrentItem.key }}">下一页</a>
	{% endif %}
	</p>

	{% if CurrentItem %}
		<hr />
		<p>发表评论：</p>
		<form action="/like_commenton_add?tag={{ Tag }}&page={{ CurPage }}&commentonpage={{ CurCommentOnPage }}&item={{ CurrentItem.key }}" method="post">
			<div><textarea name="content" rows="5" cols="60"></textarea></div>
			<div><input type="submit" value="提交"></div>
		</form>
	{% endif %}


{% endif %}
